package com.lai;

import java.util.Scanner;

public class password {
    public static void main(String[] args) {
        int passWord;//定义密码和计量变量

        System.out.println("请输入你的密码进行加密：");
        //键盘录入密码
        Scanner sc = new Scanner(System.in);
        passWord = sc.nextInt();
        //定义一个变量记录密码原来的值
        int sw = passWord;
        //取得密码的长度
        int sp = 0;
        while (passWord != 0) {
            passWord = passWord / 10;
            sp++;
        }
        int[] arr = new int[sp];
        System.out.println(sp);
        //提取数字
        int tp = arr.length - 1;
        while (sw != 0) {
            arr[tp] = sw % 10;
            sw = sw / 10;
            tp--;
        }
        for (int j = 0; j < arr.length; j++) {
            System.out.println(arr[j]);
        }
    }
}

